package com.qianniu.napi.admin.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 商家账务表
 * </p>
 *
 * @author chenxuebin
 * @since 2018-09-03
 */
@TableName("t_maccount")
public class Maccount extends Model<Maccount> {

	private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
	private Long uid;
	private String unionid;
	/**
	 * 可用金额#可用金额=可提现金额=累计充值余额+累计销售额-押金-待入账销售额-消耗金额-累计提现额-营销金额
	 */
	private BigDecimal amount;
	/**
	 * 累计销售额#累计销售额=累计(销售额=单价*数量)
	 */
	@TableField("sale_amount")
	private BigDecimal saleAmount;
	/**
	 * 待入账佣金
	 */
	private BigDecimal fanliing;
	/**
	 * 总金额#总金额=不可用金额+可用金额=累计充值余额+累计销售额
	 */
	private BigDecimal total;
	/**
	 * 冻结资金
	 */
	private BigDecimal freeze;
	/**
	 * 累计充值余额
	 */
	@TableField("charge_amount")
	private BigDecimal chargeAmount;
	/**
	 * 累计提现额
	 */
	private BigDecimal withdraw;
	/**
	 * 不可用金额#不可用金额=待入账销售额+冻结资金
	 */
	@TableField("unuse_amount")
	private BigDecimal unuseAmount;
	/**
	 * 消耗金额#消耗金额=广告费用=推广费用
	 */
	private BigDecimal consume;
	/**
	 * 营销金额#营销金额=营销成本=积分抵扣+会员卡抵扣+优惠券抵扣+红包抵扣+快递费用
	 */
	private BigDecimal mamount;
	/**
	 * 启用状态
	 */
	private BigDecimal jifen;

	/**
	 * 累计短信充值费用
	 */
	@TableField("smsmout_total")
	private BigDecimal smsmoutTotal;

	/**
	 * 短信余额
	 */
	private BigDecimal smsmout;

	/**
	 * 短信价格
	 */
	private BigDecimal smsprice;

	/**
	 * 剩余短信条数
	 */
	private Integer smstotal;

	private Integer state;
	/**
	 * 手机号
	 */
	private String phone;
	/**
	 * 版本号
	 */
	private Long version;
	private Long mid;
	private Long mpid;

	/**
	 * 操作者
	 */
	private Date createtime;
	private Date modifytime;
	private Long modifier;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUid() {
		return uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	public String getUnionid() {
		return unionid;
	}

	public void setUnionid(String unionid) {
		this.unionid = unionid;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getSaleAmount() {
		return saleAmount;
	}

	public void setSaleAmount(BigDecimal saleAmount) {
		this.saleAmount = saleAmount;
	}

	public BigDecimal getFanliing() {
		return fanliing;
	}

	public void setFanliing(BigDecimal fanliing) {
		this.fanliing = fanliing;
	}

	public BigDecimal getTotal() {
		return total;
	}

	public void setTotal(BigDecimal total) {
		this.total = total;
	}

	public BigDecimal getFreeze() {
		return freeze;
	}

	public void setFreeze(BigDecimal freeze) {
		this.freeze = freeze;
	}

	public BigDecimal getChargeAmount() {
		return chargeAmount;
	}

	public void setChargeAmount(BigDecimal chargeAmount) {
		this.chargeAmount = chargeAmount;
	}

	public BigDecimal getWithdraw() {
		return withdraw;
	}

	public void setWithdraw(BigDecimal withdraw) {
		this.withdraw = withdraw;
	}

	public BigDecimal getUnuseAmount() {
		return unuseAmount;
	}

	public void setUnuseAmount(BigDecimal unuseAmount) {
		this.unuseAmount = unuseAmount;
	}

	public BigDecimal getConsume() {
		return consume;
	}

	public void setConsume(BigDecimal consume) {
		this.consume = consume;
	}

	public BigDecimal getMamount() {
		return mamount;
	}

	public void setMamount(BigDecimal mamount) {
		this.mamount = mamount;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	public Long getMid() {
		return mid;
	}

	public void setMid(Long mid) {
		this.mid = mid;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getModifytime() {
		return modifytime;
	}

	public void setModifytime(Date modifytime) {
		this.modifytime = modifytime;
	}

	public Long getModifier() {
		return modifier;
	}

	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	public BigDecimal getJifen() {
		return jifen;
	}

	public void setJifen(BigDecimal jifen) {
		this.jifen = jifen;
	}

	public BigDecimal getSmsmoutTotal() {
		return smsmoutTotal;
	}

	public void setSmsmoutTotal(BigDecimal smsmoutTotal) {
		this.smsmoutTotal = smsmoutTotal;
	}

	public BigDecimal getSmsmout() {
		return smsmout;
	}

	public void setSmsmout(BigDecimal smsmout) {
		this.smsmout = smsmout;
	}

	public BigDecimal getSmsprice() {
		return smsprice;
	}

	public void setSmsprice(BigDecimal smsprice) {
		this.smsprice = smsprice;
	}

	public Integer getSmstotal() {
		return smstotal;
	}

	public void setSmstotal(Integer smstotal) {
		this.smstotal = smstotal;
	}

	public Long getMpid() {
		return mpid;
	}

	public void setMpid(Long mpid) {
		this.mpid = mpid;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Maccount{" +
				"id=" + id +
				", uid=" + uid +
				", unionid=" + unionid +
				", amount=" + amount +
				", saleAmount=" + saleAmount +
				", fanliing=" + fanliing +
				", total=" + total +
				", freeze=" + freeze +
				", chargeAmount=" + chargeAmount +
				", withdraw=" + withdraw +
				", unuseAmount=" + unuseAmount +
				", consume=" + consume +
				", mamount=" + mamount +
				", state=" + state +
				", phone=" + phone +
				", version=" + version +
				", mid=" + mid +
				", createtime=" + createtime +
				", modifytime=" + modifytime +
				"}";
	}
}
